
import axios from "../../utils/axios"



export default {
    namespaced:true,
    state(){
        return{
            userinfo:''

        }
    },
    mutations:{
        saveUserinfoMutations(state,list){
            state.userinfo = list
        },

    },
    actions:{
        getUserinfoActions({commit},uid){
            axios({
                url:'api/getuserinfo',
                method:"get",
                params:{uid}
            }).then(response=>{
                console.log(response.list,"profile")
                if(response.list.length>0&&response.code==200){
                    commit('saveUserinfoMutations',response.list[0])
                }

            })
        }
    },
    getters:{

    },


}

